﻿using Microsoft.AspNetCore.SignalR;

namespace ShiTai_WeightSignalR
{
    public class WeightHub: Hub
    {
        #region 终端方法

        /// <summary>
        /// 连接终端，记录当前连接的用户ClientID
        /// </summary>
        /// <param name="accountId"></param>
        /// <param name="userId"></param>
        /// <returns></returns>
        public async Task PushWeight(string ip,string weight)
        {
            await Clients.All.SendAsync("GetWeight", ip, weight);
        }

        #endregion


    }


}
